3.77 \(\int (e x)^{-1+2 n} (a+b \csc (c+d x^n))^2 \, dx\)

Optimal. Leaf size=214 \[ \frac {a^2 (e x)^{2 n}}{2 e n}+\frac {2 i a b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (-e^{i \left (d x^n+c\right )}\right )}{d^2 e n}-\frac {2 i a b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (e^{i \left (d x^n+c\right )}\right )}{d^2 e n}-\frac {4 a b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}+\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\sin \left (c+d x^n\right )\right )}{d^2 e n}-\frac {b^2 x^{-n} (e x)^{2 n} \cot \left (c+d x^n\right )}{d e n} \]

[Out]

1/2*a^2*(e*x)^(2*n)/e/n-4*a*b*(e*x)^(2*n)*arctanh(exp(I*(c+d*x^n)))/d/e/n/(x^n)-b^2*(e*x)^(2*n)*cot(c+d*x^n)/d
/e/n/(x^n)+b^2*(e*x)^(2*n)*ln(sin(c+d*x^n))/d^2/e/n/(x^(2*n))+2*I*a*b*(e*x)^(2*n)*polylog(2,-exp(I*(c+d*x^n)))
/d^2/e/n/(x^(2*n))-2*I*a*b*(e*x)^(2*n)*polylog(2,exp(I*(c+d*x^n)))/d^2/e/n/(x^(2*n))

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4209, 4205, 4190, 4183, 2279, 2391, 4184, 3475} \[ \frac {2 i a b x^{-2 n} (e x)^{2 n} \text {PolyLog}\left (2,-e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac {2 i a b x^{-2 n} (e x)^{2 n} \text {PolyLog}\left (2,e^{i \left (c+d x^n\right )}\right )}{d^2 e n}+\frac {a^2 (e x)^{2 n}}{2 e n}-\frac {4 a b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}+\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\sin \left (c+d x^n\right )\right )}{d^2 e n}-\frac {b^2 x^{-n} (e x)^{2 n} \cot \left (c+d x^n\right )}{d e n} \]

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + 2*n)*(a + b*Csc[c + d*x^n])^2,x]

[Out]

(a^2*(e*x)^(2*n))/(2*e*n) - (4*a*b*(e*x)^(2*n)*ArcTanh[E^(I*(c + d*x^n))])/(d*e*n*x^n) - (b^2*(e*x)^(2*n)*Cot[
c + d*x^n])/(d*e*n*x^n) + (b^2*(e*x)^(2*n)*Log[Sin[c + d*x^n]])/(d^2*e*n*x^(2*n)) + ((2*I)*a*b*(e*x)^(2*n)*Pol
yLog[2, -E^(I*(c + d*x^n))])/(d^2*e*n*x^(2*n)) - ((2*I)*a*b*(e*x)^(2*n)*PolyLog[2, E^(I*(c + d*x^n))])/(d^2*e*
n*x^(2*n))

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4183

Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E^(I*(e + f*
x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Dist[(d*m)/f, Int[(c +
d*x)^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IGtQ[m, 0]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 4190

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 4205

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 4209

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*((e_)*(x_))^(m_.), x_Symbol] :> Dist[(e^IntPart[m]*(e*x
)^FracPart[m])/x^FracPart[m], Int[x^m*(a + b*Csc[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps

\begin {align*} \int (e x)^{-1+2 n} \left (a+b \csc \left (c+d x^n\right )\right )^2 \, dx &=\frac {\left (x^{-2 n} (e x)^{2 n}\right ) \int x^{-1+2 n} \left (a+b \csc \left (c+d x^n\right )\right )^2 \, dx}{e}\\ &=\frac {\left (x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int x (a+b \csc (c+d x))^2 \, dx,x,x^n\right )}{e n}\\ &=\frac {\left (x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int \left (a^2 x+2 a b x \csc (c+d x)+b^2 x \csc ^2(c+d x)\right ) \, dx,x,x^n\right )}{e n}\\ &=\frac {a^2 (e x)^{2 n}}{2 e n}+\frac {\left (2 a b x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int x \csc (c+d x) \, dx,x,x^n\right )}{e n}+\frac {\left (b^2 x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int x \csc ^2(c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac {a^2 (e x)^{2 n}}{2 e n}-\frac {4 a b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}-\frac {b^2 x^{-n} (e x)^{2 n} \cot \left (c+d x^n\right )}{d e n}-\frac {\left (2 a b x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int \log \left (1-e^{i (c+d x)}\right ) \, dx,x,x^n\right )}{d e n}+\frac {\left (2 a b x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int \log \left (1+e^{i (c+d x)}\right ) \, dx,x,x^n\right )}{d e n}+\frac {\left (b^2 x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int \cot (c+d x) \, dx,x,x^n\right )}{d e n}\\ &=\frac {a^2 (e x)^{2 n}}{2 e n}-\frac {4 a b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}-\frac {b^2 x^{-n} (e x)^{2 n} \cot \left (c+d x^n\right )}{d e n}+\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\sin \left (c+d x^n\right )\right )}{d^2 e n}+\frac {\left (2 i a b x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac {\left (2 i a b x^{-2 n} (e x)^{2 n}\right ) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i \left (c+d x^n\right )}\right )}{d^2 e n}\\ &=\frac {a^2 (e x)^{2 n}}{2 e n}-\frac {4 a b x^{-n} (e x)^{2 n} \tanh ^{-1}\left (e^{i \left (c+d x^n\right )}\right )}{d e n}-\frac {b^2 x^{-n} (e x)^{2 n} \cot \left (c+d x^n\right )}{d e n}+\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\sin \left (c+d x^n\right )\right )}{d^2 e n}+\frac {2 i a b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (-e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac {2 i a b x^{-2 n} (e x)^{2 n} \text {Li}_2\left (e^{i \left (c+d x^n\right )}\right )}{d^2 e n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 6.28, size = 286, normalized size = 1.34 \[ \frac {x^{-2 n} (e x)^{2 n} \left (d x^n \left (a^2 d x^n-2 b^2 \cot (c)\right )+4 a b \left (2 \tan ^{-1}(\tan (c)) \tanh ^{-1}\left (\cos (c)-\sin (c) \tan \left (\frac {d x^n}{2}\right )\right )+\frac {\sec (c) \left (i \text {Li}_2\left (-e^{i \left (d x^n+\tan ^{-1}(\tan (c))\right )}\right )-i \text {Li}_2\left (e^{i \left (d x^n+\tan ^{-1}(\tan (c))\right )}\right )+\left (\tan ^{-1}(\tan (c))+d x^n\right ) \left (\log \left (1-e^{i \left (\tan ^{-1}(\tan (c))+d x^n\right )}\right )-\log \left (1+e^{i \left (\tan ^{-1}(\tan (c))+d x^n\right )}\right )\right )\right )}{\sqrt {\sec ^2(c)}}\right )+2 b^2 d \cot (c) x^n+b^2 d \csc \left (\frac {c}{2}\right ) x^n \sin \left (\frac {d x^n}{2}\right ) \csc \left (\frac {1}{2} \left (c+d x^n\right )\right )+b^2 d \sec \left (\frac {c}{2}\right ) x^n \sin \left (\frac {d x^n}{2}\right ) \sec \left (\frac {1}{2} \left (c+d x^n\right )\right )-2 b^2 \left (d \cot (c) x^n-\log \left (\sin \left (c+d x^n\right )\right )\right )\right )}{2 d^2 e n} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(e*x)^(-1 + 2*n)*(a + b*Csc[c + d*x^n])^2,x]

[Out]

((e*x)^(2*n)*(2*b^2*d*x^n*Cot[c] + d*x^n*(a^2*d*x^n - 2*b^2*Cot[c]) - 2*b^2*(d*x^n*Cot[c] - Log[Sin[c + d*x^n]
]) + 4*a*b*(2*ArcTan[Tan[c]]*ArcTanh[Cos[c] - Sin[c]*Tan[(d*x^n)/2]] + (((d*x^n + ArcTan[Tan[c]])*(Log[1 - E^(
I*(d*x^n + ArcTan[Tan[c]]))] - Log[1 + E^(I*(d*x^n + ArcTan[Tan[c]]))]) + I*PolyLog[2, -E^(I*(d*x^n + ArcTan[T
an[c]]))] - I*PolyLog[2, E^(I*(d*x^n + ArcTan[Tan[c]]))])*Sec[c])/Sqrt[Sec[c]^2]) + b^2*d*x^n*Csc[c/2]*Csc[(c
+ d*x^n)/2]*Sin[(d*x^n)/2] + b^2*d*x^n*Sec[c/2]*Sec[(c + d*x^n)/2]*Sin[(d*x^n)/2]))/(2*d^2*e*n*x^(2*n))

________________________________________________________________________________________

fricas [B]  time = 0.60, size = 568, normalized size = 2.65 \[ \frac {a^{2} d^{2} e^{2 \, n - 1} x^{2 \, n} \sin \left (d x^{n} + c\right ) - 2 \, b^{2} d e^{2 \, n - 1} x^{n} \cos \left (d x^{n} + c\right ) - 2 i \, a b e^{2 \, n - 1} {\rm Li}_2\left (\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right )\right ) \sin \left (d x^{n} + c\right ) + 2 i \, a b e^{2 \, n - 1} {\rm Li}_2\left (\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right )\right ) \sin \left (d x^{n} + c\right ) - 2 i \, a b e^{2 \, n - 1} {\rm Li}_2\left (-\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right )\right ) \sin \left (d x^{n} + c\right ) + 2 i \, a b e^{2 \, n - 1} {\rm Li}_2\left (-\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right )\right ) \sin \left (d x^{n} + c\right ) - {\left (2 \, a b c - b^{2}\right )} e^{2 \, n - 1} \log \left (-\frac {1}{2} \, \cos \left (d x^{n} + c\right ) + \frac {1}{2} i \, \sin \left (d x^{n} + c\right ) + \frac {1}{2}\right ) \sin \left (d x^{n} + c\right ) - {\left (2 \, a b c - b^{2}\right )} e^{2 \, n - 1} \log \left (-\frac {1}{2} \, \cos \left (d x^{n} + c\right ) - \frac {1}{2} i \, \sin \left (d x^{n} + c\right ) + \frac {1}{2}\right ) \sin \left (d x^{n} + c\right ) - {\left (2 \, a b d e^{2 \, n - 1} x^{n} - b^{2} e^{2 \, n - 1}\right )} \log \left (\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right ) + 1\right ) \sin \left (d x^{n} + c\right ) - {\left (2 \, a b d e^{2 \, n - 1} x^{n} - b^{2} e^{2 \, n - 1}\right )} \log \left (\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right ) + 1\right ) \sin \left (d x^{n} + c\right ) + 2 \, {\left (a b d e^{2 \, n - 1} x^{n} + a b c e^{2 \, n - 1}\right )} \log \left (-\cos \left (d x^{n} + c\right ) + i \, \sin \left (d x^{n} + c\right ) + 1\right ) \sin \left (d x^{n} + c\right ) + 2 \, {\left (a b d e^{2 \, n - 1} x^{n} + a b c e^{2 \, n - 1}\right )} \log \left (-\cos \left (d x^{n} + c\right ) - i \, \sin \left (d x^{n} + c\right ) + 1\right ) \sin \left (d x^{n} + c\right )}{2 \, d^{2} n \sin \left (d x^{n} + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n))^2,x, algorithm="fricas")

[Out]

1/2*(a^2*d^2*e^(2*n - 1)*x^(2*n)*sin(d*x^n + c) - 2*b^2*d*e^(2*n - 1)*x^n*cos(d*x^n + c) - 2*I*a*b*e^(2*n - 1)
*dilog(cos(d*x^n + c) + I*sin(d*x^n + c))*sin(d*x^n + c) + 2*I*a*b*e^(2*n - 1)*dilog(cos(d*x^n + c) - I*sin(d*
x^n + c))*sin(d*x^n + c) - 2*I*a*b*e^(2*n - 1)*dilog(-cos(d*x^n + c) + I*sin(d*x^n + c))*sin(d*x^n + c) + 2*I*
a*b*e^(2*n - 1)*dilog(-cos(d*x^n + c) - I*sin(d*x^n + c))*sin(d*x^n + c) - (2*a*b*c - b^2)*e^(2*n - 1)*log(-1/
2*cos(d*x^n + c) + 1/2*I*sin(d*x^n + c) + 1/2)*sin(d*x^n + c) - (2*a*b*c - b^2)*e^(2*n - 1)*log(-1/2*cos(d*x^n
 + c) - 1/2*I*sin(d*x^n + c) + 1/2)*sin(d*x^n + c) - (2*a*b*d*e^(2*n - 1)*x^n - b^2*e^(2*n - 1))*log(cos(d*x^n
 + c) + I*sin(d*x^n + c) + 1)*sin(d*x^n + c) - (2*a*b*d*e^(2*n - 1)*x^n - b^2*e^(2*n - 1))*log(cos(d*x^n + c)
- I*sin(d*x^n + c) + 1)*sin(d*x^n + c) + 2*(a*b*d*e^(2*n - 1)*x^n + a*b*c*e^(2*n - 1))*log(-cos(d*x^n + c) + I
*sin(d*x^n + c) + 1)*sin(d*x^n + c) + 2*(a*b*d*e^(2*n - 1)*x^n + a*b*c*e^(2*n - 1))*log(-cos(d*x^n + c) - I*si
n(d*x^n + c) + 1)*sin(d*x^n + c))/(d^2*n*sin(d*x^n + c))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \csc \left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{2 \, n - 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n))^2,x, algorithm="giac")

[Out]

integrate((b*csc(d*x^n + c) + a)^2*(e*x)^(2*n - 1), x)

________________________________________________________________________________________

maple [C]  time = 1.95, size = 674, normalized size = 3.15 \[ \frac {a^{2} x \,{\mathrm e}^{\frac {\left (-1+2 n \right ) \left (-i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-i \pi \mathrm {csgn}\left (i e x \right )^{3}+2 \ln \relax (x )+2 \ln \relax (e )\right )}{2}}}{2 n}-\frac {2 i x \,{\mathrm e}^{\frac {\left (-1+2 n \right ) \left (-i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-i \pi \mathrm {csgn}\left (i e x \right )^{3}+2 \ln \relax (x )+2 \ln \relax (e )\right )}{2}} b^{2} x^{-n}}{d n \left ({\mathrm e}^{2 i \left (c +d \,x^{n}\right )}-1\right )}-\frac {2 b^{2} \ln \left ({\mathrm e}^{i x^{n} d}\right ) e^{2 n} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+2 n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d^{2} n e}+\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (c +d \,x^{n}\right )}-1\right ) e^{2 n} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+2 n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d^{2} n e}+\frac {2 b \ln \left (1-{\mathrm e}^{i \left (c +d \,x^{n}\right )}\right ) x^{n} a \,e^{2 n} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+2 n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d n e}-\frac {2 b \ln \left ({\mathrm e}^{i \left (c +d \,x^{n}\right )}+1\right ) x^{n} a \,e^{2 n} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+2 n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d n e}-\frac {2 i b \dilog \left (1-{\mathrm e}^{i \left (c +d \,x^{n}\right )}\right ) a \,e^{2 n} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+2 n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d^{2} n e}+\frac {2 i b \dilog \left ({\mathrm e}^{i \left (c +d \,x^{n}\right )}+1\right ) a \,e^{2 n} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+2 n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d^{2} n e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n))^2,x)

[Out]

1/2*a^2/n*x*exp(1/2*(-1+2*n)*(-I*csgn(I*e*x)^3*Pi+I*csgn(I*e*x)^2*csgn(I*e)*Pi+I*csgn(I*e*x)^2*csgn(I*x)*Pi-I*
csgn(I*e*x)*csgn(I*e)*csgn(I*x)*Pi+2*ln(e)+2*ln(x)))-2*I*x*exp(1/2*(-1+2*n)*(-I*csgn(I*e*x)^3*Pi+I*csgn(I*e*x)
^2*csgn(I*e)*Pi+I*csgn(I*e*x)^2*csgn(I*x)*Pi-I*csgn(I*e*x)*csgn(I*e)*csgn(I*x)*Pi+2*ln(e)+2*ln(x)))*b^2/d/n/(x
^n)/(exp(2*I*(c+d*x^n))-1)-2*b^2/d^2*ln(exp(I*x^n*d))/n/e*(e^n)^2*exp(1/2*I*Pi*csgn(I*e*x)*(-1+2*n)*(csgn(I*e*
x)-csgn(I*x))*(-csgn(I*e*x)+csgn(I*e)))+b^2/d^2*ln(exp(2*I*(c+d*x^n))-1)/n/e*(e^n)^2*exp(1/2*I*Pi*csgn(I*e*x)*
(-1+2*n)*(csgn(I*e*x)-csgn(I*x))*(-csgn(I*e*x)+csgn(I*e)))+2*b/d*ln(1-exp(I*(c+d*x^n)))*x^n/n*a/e*(e^n)^2*exp(
1/2*I*Pi*csgn(I*e*x)*(-1+2*n)*(csgn(I*e*x)-csgn(I*x))*(-csgn(I*e*x)+csgn(I*e)))-2*b/d*ln(exp(I*(c+d*x^n))+1)*x
^n/n*a/e*(e^n)^2*exp(1/2*I*Pi*csgn(I*e*x)*(-1+2*n)*(csgn(I*e*x)-csgn(I*x))*(-csgn(I*e*x)+csgn(I*e)))-2*I*b/d^2
*dilog(1-exp(I*(c+d*x^n)))/n*a/e*(e^n)^2*exp(1/2*I*Pi*csgn(I*e*x)*(-1+2*n)*(csgn(I*e*x)-csgn(I*x))*(-csgn(I*e*
x)+csgn(I*e)))+2*I*b/d^2*dilog(exp(I*(c+d*x^n))+1)/n*a/e*(e^n)^2*exp(1/2*I*Pi*csgn(I*e*x)*(-1+2*n)*(csgn(I*e*x
)-csgn(I*x))*(-csgn(I*e*x)+csgn(I*e)))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\left (e x\right )^{2 \, n} a^{2}}{2 \, e n} - \frac {2 \, b^{2} e^{2 \, n} x^{n} \sin \left (2 \, d x^{n} + 2 \, c\right ) - \frac {1}{2} \, {\left (4 \, a b d^{2} e^{2 \, n + 1} \int \frac {x^{2 \, n} \sin \left (d x^{n} + c\right )}{d^{2} e^{2} x \cos \left (d x^{n} + c\right )^{2} + d^{2} e^{2} x \sin \left (d x^{n} + c\right )^{2} + 2 \, d^{2} e^{2} x \cos \left (d x^{n} + c\right ) + d^{2} e^{2} x}\,{d x} + \frac {b^{2} e^{2 \, n - 1} \log \left (\cos \left (d x^{n}\right )^{2} + 2 \, \cos \left (d x^{n}\right ) \cos \relax (c) + \cos \relax (c)^{2} + \sin \left (d x^{n}\right )^{2} - 2 \, \sin \left (d x^{n}\right ) \sin \relax (c) + \sin \relax (c)^{2}\right )}{d^{2} n}\right )} {\left (d e n \cos \left (2 \, d x^{n} + 2 \, c\right )^{2} + d e n \sin \left (2 \, d x^{n} + 2 \, c\right )^{2} - 2 \, d e n \cos \left (2 \, d x^{n} + 2 \, c\right ) + d e n\right )} - \frac {1}{2} \, {\left (4 \, a b d^{2} e^{2 \, n + 1} \int \frac {x^{2 \, n} \sin \left (d x^{n} + c\right )}{d^{2} e^{2} x \cos \left (d x^{n} + c\right )^{2} + d^{2} e^{2} x \sin \left (d x^{n} + c\right )^{2} - 2 \, d^{2} e^{2} x \cos \left (d x^{n} + c\right ) + d^{2} e^{2} x}\,{d x} + \frac {b^{2} e^{2 \, n - 1} \log \left (\cos \left (d x^{n}\right )^{2} - 2 \, \cos \left (d x^{n}\right ) \cos \relax (c) + \cos \relax (c)^{2} + \sin \left (d x^{n}\right )^{2} + 2 \, \sin \left (d x^{n}\right ) \sin \relax (c) + \sin \relax (c)^{2}\right )}{d^{2} n}\right )} {\left (d e n \cos \left (2 \, d x^{n} + 2 \, c\right )^{2} + d e n \sin \left (2 \, d x^{n} + 2 \, c\right )^{2} - 2 \, d e n \cos \left (2 \, d x^{n} + 2 \, c\right ) + d e n\right )}}{d e n \cos \left (2 \, d x^{n} + 2 \, c\right )^{2} + d e n \sin \left (2 \, d x^{n} + 2 \, c\right )^{2} - 2 \, d e n \cos \left (2 \, d x^{n} + 2 \, c\right ) + d e n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+2*n)*(a+b*csc(c+d*x^n))^2,x, algorithm="maxima")

[Out]

1/2*(e*x)^(2*n)*a^2/(e*n) - (2*b^2*e^(2*n)*x^n*sin(2*d*x^n + 2*c) - (d*e*n*cos(2*d*x^n + 2*c)^2 + d*e*n*sin(2*
d*x^n + 2*c)^2 - 2*d*e*n*cos(2*d*x^n + 2*c) + d*e*n)*integrate((2*a*b*d*e^(2*n)*x^(2*n) - b^2*e^(2*n)*x^n)*sin
(d*x^n + c)/(d*e*x*cos(d*x^n + c)^2 + d*e*x*sin(d*x^n + c)^2 + 2*d*e*x*cos(d*x^n + c) + d*e*x), x) - (d*e*n*co
s(2*d*x^n + 2*c)^2 + d*e*n*sin(2*d*x^n + 2*c)^2 - 2*d*e*n*cos(2*d*x^n + 2*c) + d*e*n)*integrate((2*a*b*d*e^(2*
n)*x^(2*n) + b^2*e^(2*n)*x^n)*sin(d*x^n + c)/(d*e*x*cos(d*x^n + c)^2 + d*e*x*sin(d*x^n + c)^2 - 2*d*e*x*cos(d*
x^n + c) + d*e*x), x))/(d*e*n*cos(2*d*x^n + 2*c)^2 + d*e*n*sin(2*d*x^n + 2*c)^2 - 2*d*e*n*cos(2*d*x^n + 2*c) +
 d*e*n)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (a+\frac {b}{\sin \left (c+d\,x^n\right )}\right )}^2\,{\left (e\,x\right )}^{2\,n-1} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/sin(c + d*x^n))^2*(e*x)^(2*n - 1),x)

[Out]

int((a + b/sin(c + d*x^n))^2*(e*x)^(2*n - 1), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (e x\right )^{2 n - 1} \left (a + b \csc {\left (c + d x^{n} \right )}\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+2*n)*(a+b*csc(c+d*x**n))**2,x)

[Out]

Integral((e*x)**(2*n - 1)*(a + b*csc(c + d*x**n))**2, x)

________________________________________________________________________________________